package com.enen.controller;

import com.enen.pojo.*;
import com.enen.service.LogService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

// 日志列表
@Slf4j
@RestController
@RequestMapping("/log")
public class LogController {
    @Autowired
    private LogService logService;

    @GetMapping("/page")
    public Result findAll(LogQueryParam logQueryParam){
        log.info("日志分页查询{}",logQueryParam);
        PageResult<OperateLog> pageResult = logService.findAll(logQueryParam);
        return Result.success(pageResult);
    }
}
